home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
A-An
/
Airport.cpt
/
Airport1.0
/
background_35082.txt
< prev
next >
Wrap
Text File
|
1988-01-04
|
6KB
|
297 lines
-- background: 35082 from stack: in.0
-- bmap block id: 123022
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on openCard
put empty into field LatLonga
end openCard
on calcltlg
put last word of line 1 of field LatLong into ld
put ld/60 into ld
put first word of line 1 of field LatLong into lfw
if char 1 of lfw = "N" then
delete char 1 of lfw
put lfw+ld into lfw
else
delete char 1 of lfw
put lfw+ld into lfw
put -1*lfw into lfw
end if
put lfw into lat
put last word of line 2 of field LatLong into ld
put ld/60 into ld
put first word of line 2 of field LatLong into lfw
if char 1 of lfw = "W" then
delete char 1 of lfw
put lfw+ld into lfw
else
delete char 1 of lfw
put lfw+ld into lfw
put -1*lfw into lfw
end if
put lfw into lng
put line 5 of field LatLong into var
if char 1 of var ="W" then
delete char 1 of var
else
put "-" into char 1 of var
end if
put line 3 of field LatLong into mc
put mc-var into crs
if crs > 360 then put crs - 360 into crs
if crs < 0 then put 360 + crs into crs
put line 4 of field LatLong into d
put dlat(lat,lng,crs,d) into latn
put dlong(lat,latn,lng,crs,d) into longn
put trunc(abs(latn)) into dg
if length(dg)<2 then put "0" & dg into dg
if latn<0 then
put "S" & dg into lt
else
put "N" & dg into lt
end if
put round((latn-trunc(abs(latn)))*60) into mins
if length(mins) = 1 then put "0" & mins into mins
put lt && mins into latn
put latn into line 1 of field LatLonga
put trunc(abs(longn)) into dg
if length(dg)<3 then put "0" & dg into dg
if length(dg)<3 then put "0" & dg into dg
if longn<0 then
put "E" & dg into lt
else
put "W" & dg into lt
end if
put round((longn-trunc(abs(longn)))*60) into mins
if length(mins) = 1 then put "0" & mins into mins
put lt && mins into longn
put longn into line 2 of field LatLonga
end calcltlg
-- part 1 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=108 top=111 right=196 bottom=236
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: LatLong
-- part 2 (field)
-- low flags: 01
-- high flags: 4000
-- rect: left=237 top=111 right=146 bottom=366
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: LatLonga
-- part 3 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=253 top=151 right=205 bottom=325
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Calculate
----- HyperTalk script -----
on mouseUp
set cursor to 4
calcltlg
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=234 top=268 right=295 bottom=265
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prev
----- HyperTalk script -----
on mouseUp
visual effect scroll right
go to prev card
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=266 top=268 right=295 bottom=297
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
visual effect scroll left
go to next card
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=423 top=272 right=298 bottom=453
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
visual effect iris close
pop card
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 2004
-- rect: left=444 top=92 right=132 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 9965 / 9965
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: VOR's
----- HyperTalk script -----
on mouseUp
push this card
go to card "fcVor"
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=446 top=175 right=212 bottom=485
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Plan
----- HyperTalk script -----
on mouseUp
go to card "Nav"
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=445 top=136 right=171 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Add
----- HyperTalk script -----
on mouseUp
put false into ksw
if line 1 of field LatLonga is not empty then
put true into ksw
ask "Name"
put it into name
ask "ID"
put it into id
ask STATE
put it into st
ask FREQUENCY
put it into freq
ask ELEVATION
put it into elev
put line 1 of field LatLonga into lat
put line 2 of field LatLonga into lng
put line 5 of field Latlong into var
end if
go to last card
doMenu "NEW CARD"
if ksw then
put name into line 1 of field AirportData
put id into line 2 of field AirportData
put freq into line 4 of field AirportData
put st into line 3 of field AirportData
put lat into line 5 of field AirportData
put lng into line 6 of field AirportData
put elev into line 7 of field AirportData
put var into line 8 of field AirportData
end if
IF ksw is false then type tab
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 2004
-- rect: left=443 top=53 right=89 bottom=485
-- title width / last selected line: 0
-- icon id / first selected line: 20913 / 20913
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Airprt
----- HyperTalk script -----
on mouseUp
go to card "fcAirport"
end mouseUp